import ftplib
import glob

host = '119.96.227.23'
f = ftplib.FTP()
f.encoding = 'GB18030'
f.connect(host, 21)
f.login('root', 'Rr.33557799')

file_path = '/dengrens/华为5G/' + glob.glob('/dengrens/华为5G/*.csv')[0]
ff = open(file_path, 'rb')
f.storbinary('STOR'+' '+file_path.split('/')[-1], ff)